package com.ayz.gateway.common.constants;

import lombok.Data;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

/**
 * @ClassName ApplicationConfigWrapper
 * @Description TODO: 微服务网关配置的包装类 用于服务注册
 * @Author 快乐的星球
 * @Date 2023/5/13 16:56
 * @Version 1.0
 **/
@Data
public class ApplicationConfigWrapper implements Serializable {
    /**
     * 微服务的名称
     */
    private String applicationName;
    /**
     * 当前微服务提供的所有API接口
     */
    private List<ApiData> apiDataList=new ArrayList<>();
    /**
     * 数据的版本
     */
    private DataVersion dataVersion;

    public ApplicationConfigWrapper(String applicationName, List<ApiData> apiDataList, DataVersion dataVersion) {
        this.applicationName = applicationName;
        this.apiDataList = apiDataList;
        this.dataVersion = dataVersion;
    }
    public void addApiData(ApiData apiData){
        this.apiDataList.add(apiData);
    }

    public ApplicationConfigWrapper() {
    }
}
